package com.kmxd.ams.client.archive.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 门类关联设置
 *
 * @author nickbi
 * @since 2022-07-20
 */
@Data
@Schema(description = "门类关联设置对象")
public class ArchiveRelationSettingVO implements Serializable {

  private static final long serialVersionUID = 1L;

  @Schema(description = "主键ID")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long id;

  @Schema(description = "门类配置id 关联s_archive_type表主键 关联门类")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long archTypeId;

  @Schema(description = "表名")
  @JsonSerialize(using = ToStringSerializer.class)
  private String tableId;

  @Schema(description = "关联档案-业务系统标识 1启用  其它：不启用")
  private Boolean relationBusiness;

  @Schema(description = "关联档案-档案系统标识 1启用  其它：不启用")
  private Boolean relationArchive;

  @Schema(description = "关联档案-元数据 1启用  其它：不启用")
  private Boolean relationField;

  @Schema(description = "元数据id列表 多个用逗号分隔。")
  private String fieldIds;

  @Schema(description = "创建人")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long createBy;

  @Schema(description = "创建时间")
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private Date createTime;

  @Schema(description = "更新人")
  @JsonSerialize(using = ToStringSerializer.class)
  private Long updateBy;

  @Schema(description = "更新时间")
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private Date updateTime;

  @Schema(description = "删除状态(0-正常,1-已删除)")
  private Long delFlag;

  @Schema(description = "关联元数据列表")
  private List<ArchiveRelationSettingFieldVO> fieldList;
}
